package ru.cybertek.domain;

/**
 * @author Dmitry Demyankov
 * @version $Revision: 54 $
 * 
 *         (C) Copyright 2009 CyberTek Ltd. All rights reserved.
 */
public class Person extends StoredEntity
{
    private String firstName;

    private String middleName;

    private String lastName;

    private ContactInformation contactInformation;

    private PersonFinancialDetails financialDetails;

    /**
     * Default constructor.
     */
    public Person() {}
    
    public Person(Integer id)
    {
    	super.setId(id);
    }

    /**
     * Returns person full name (last name, first name and middle name).
     * 
     * @return person full name.
     */
    public String getFullName()
    {
        return lastName + " " + firstName + " " + middleName;
    }

    /**
     * Getter for property firstName.
     * 
     * @return the firstName
     */
    public String getFirstName()
    {
        return firstName;
    }

    /**
     * Setter for property firstName.
     * 
     * @param firstName
     *            the firstName to set
     */
    public void setFirstName(String firstName)
    {
        this.firstName = firstName;
    }

    /**
     * Getter for property middleName.
     * 
     * @return the middleName
     */
    public String getMiddleName()
    {
        return middleName;
    }

    /**
     * Setter for property middleName.
     * 
     * @param middleName
     *            the middleName to set
     */
    public void setMiddleName(String middleName)
    {
        this.middleName = middleName;
    }

    /**
     * Getter for property lastName.
     * 
     * @return the lastName
     */
    public String getLastName()
    {
        return lastName;
    }

    /**
     * Setter for property lastName.
     * 
     * @param lastName
     *            the lastName to set
     */
    public void setLastName(String lastName)
    {
        this.lastName = lastName;
    }

    /**
     * Getter for property contactInformation.
     * 
     * @return the contactInformation
     */
    public ContactInformation getContactInformation()
    {
        return contactInformation;
    }

    /**
     * Setter for property contactInformation.
     * 
     * @param contactInformation
     *            the contactInformation to set
     */
    public void setContactInformation(ContactInformation contactInformation)
    {
        this.contactInformation = contactInformation;
    }

    /**
     * Getter for property financialDetails.
     * 
     * @return the financialDetails
     */
    public PersonFinancialDetails getFinancialDetails()
    {
        return financialDetails;
    }

    /**
     * Setter for property financialDetails.
     * 
     * @param financialDetails
     *            the financialDetails to set
     */
    public void setFinancialDetails(PersonFinancialDetails financialDetails)
    {
        this.financialDetails = financialDetails;
    }
    
    /**
     * 
     */
    public String toString()
    {
    	return firstName+" "+lastName;
    }
    
    /**
     * Getter for label of the person in one string. Same as method toString()
     * 
     * @return String - label of the person
     */
    public String getLabel()
    {
    	return this.toString();
    }
}
